<?php 


$contentLIst = file_get_contents('http://2016.ifeng.com/listpage/71136/1/list.shtml');


$preg = "/<h2><a href=\"(.+\.shtml)\"/";


preg_match_all($preg, $contentLIst,$listouput);

$list = $listouput[1];


$temp = array();

foreach ($list as  $key=>  $v) {

	if($key==10){
		break;
	}

	$content = file_get_contents($v);

	$preg = "/<h1 itemprop=\"headline\" id=\"artical_topic\">(.+)<\/h1>/";


	preg_match_all($preg, $content,$ouput);

	$temp[] = $ouput[1][0];

}


$str = var_export($temp,True);

$str = "<?php return ".$str."?>";

file_put_contents('./db.php', $str);



























 ?>